package shapes;

public  class Rectangle extends Shape{
	private double  width;
	private double length;
	public double getwidth(){
		return width;
	}
	
	public void setWidth(double width){
		this.width = width;
	}

	public double getLength() {
		return length;
	}

	public void setLength(double length) {
		this.length = length;
	}

	public Rectangle(double width,double length) {
		this.width = width;
		this.length = length;
	}
	

	@Override
	public double getPerimeter() {
		return 2*(length+width);
	}

	@Override
	public double getArea() {

		return length*width;
	}

	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	
}
